<template>
	<view>
		<list-scroll>
			<uni-load-more status="loading" iconType="snow" v-if="articleList.length === 0&&!noData"></uni-load-more>
			<list-card v-for="item in articleList" :key="item._id" :item="item"></list-card>
			<view class="no-data" v-if="noData">
				您暂时还没发过帖
			</view>
		</list-scroll>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				articleList:[],
				noData:false
			}
		},
		onLoad(){
			this.getMyArticle()
		},
		methods: {
			getMyArticle(){
				this.$api.get_my_article({
					
				}).then((res)=>{
					console.log(res)
					this.articleList = res.data
					this.noData = this.articleList.length === 0
				})
			}
		}
	}
</script>

<style>
.no-data{
	font-size: 14px;
	color: #666;
	text-align: center;
	padding: 100px;
}
</style>
